<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://www.sf.net/frails" prefix="fr"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view>
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
		<head>
			<meta http-equiv="pragma" content="no-cache" />
			<meta http-equiv="cache-control" content="no-cache" />
			<meta http-equiv="expires" content="0" />
			<meta http-equiv="keywords" content="keyword1,keyword2,keyword3" />
			<meta http-equiv="description" content="This is my page" />
			<title><h:outputText value="#{$bundle.page_title_user_admin}" />
			</title>
		</head>
		<body>
			<h:form>
				<h1>
					<h:outputText value="#{$bundle.page_title_user_admin}" />
					<font size="2">你好: <h:outputText value="#{$.loginUser.loginName}" /> </font>
				</h1>
				<ul>
					<%-- 首页  --%>
					<li>
						<h:commandButton value="回首页" actionListener="#{$.gotoUserHome}" action="r:/user/userHome" immediate="true" />
					</li>
					<li>
						<h:commandButton value="添加用户" action="r:/user/addUser" immediate="true" />
					</li>
				</ul>
				<h:messages />
			<br />
			<br />
			未审核用户
			<hr />

				<h:dataTable value="#{$.unauths}" var="user" headerClass="headerClass" rowClasses="rowClass"
					columnClasses="colClass1,colClass2" styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_auth_user}" />
						</f:facet>
						<h:commandLink action="#{$.auth}" value="#{$bundle.label_auth_user}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_delete_user}" />
						</f:facet>
						<h:commandLink actionListener="#{$.delete}" value="#{$bundle.label_delete_user}" />
					</h:column>
				</h:dataTable>
			<br />
			<br />
			内容提供商 CP 用户
			<hr />

				<h:dataTable value="#{$.cps}" var="user" headerClass="headerClass" rowClasses="rowClass" columnClasses="colClass1,colClass2"
					styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_show_user_detail}" />
						</f:facet>
						<h:commandLink action="#{$.detail}" value="#{$bundle.label_show_user_detail}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_delete_user}" />
						</f:facet>
						<h:commandLink actionListener="#{$.delete}" value="#{$bundle.label_delete_user}" />
					</h:column>
				</h:dataTable>
			<br />
			<br />
			服务提供商 SP 用户
			<hr />

				<h:dataTable value="#{$.sps}" var="user" headerClass="headerClass" rowClasses="rowClass" columnClasses="colClass1,colClass2"
					styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_show_user_detail}" />
						</f:facet>
						<h:commandLink action="#{$.detail}" value="#{$bundle.label_show_user_detail}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_delete_user}" />
						</f:facet>
						<h:commandLink actionListener="#{$.delete}" value="#{$bundle.label_delete_user}" />
					</h:column>
				</h:dataTable>
			<br />
			<br />
			CDM 管理员
			<hr />

				<h:dataTable value="#{$.cdms}" var="user" headerClass="headerClass" rowClasses="rowClass" columnClasses="colClass1,colClass2"
					styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_show_user_detail}" />
						</f:facet>
						<h:commandLink action="#{$.detail}" value="#{$bundle.label_show_user_detail}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_delete_user}" />
						</f:facet>
						<h:commandLink actionListener="#{$.delete}" value="#{$bundle.label_delete_user}" />
					</h:column>
				</h:dataTable>
			<br />
			<br />
			系统管理员
			<hr />

				<h:dataTable value="#{$.admins}" var="user" headerClass="headerClass" rowClasses="rowClass"
					columnClasses="colClass1,colClass2" styleClass="tableClass">
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userId}" />
						</f:facet>
						<h:outputText value="#{user.userId}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_loginName}" />
						</f:facet>
						<h:outputText value="#{user.loginName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userName}" />
						</f:facet>
						<h:outputText value="#{user.userName}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_email}" />
						</f:facet>
						<h:outputText value="#{user.email}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_phone}" />
						</f:facet>
						<h:outputText value="#{user.phone}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_user_userRole}" />
						</f:facet>
						<h:outputText value="#{user.userRole}" />
					</h:column>

					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_show_user_detail}" />
						</f:facet>
						<h:commandLink action="#{$.detail}" value="#{$bundle.label_show_user_detail}" />
					</h:column>
					<h:column>
						<f:facet name="header">
							<h:outputText value="#{$bundle.label_delete_user}" />
						</f:facet>
						<h:commandLink actionListener="#{$.delete}" value="#{$bundle.label_delete_user}" />
					</h:column>
				</h:dataTable>

				<hr />

				<h:commandButton id="aaa" value="#{$bundle.title_new}" action="#{$.create}" immediate="true" styleClass="plat" />

				<fr:validatorScript clientValidation="true" />

			</h:form>
		</body>
	</html>
</f:view>
